package com.xiaofeng.pochi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaofeng.pochi.common.Page;
import com.xiaofeng.pochi.pojo.SysRole;
import com.xiaofeng.pochi.pojo.SysUser;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: chc
 * @Date: 2022/07/26/21:57
 * @Description:
 */
public interface SysRoleMapper extends BaseMapper<SysRole> {

    /**
     * 分页查询
     * @param page
     * @return
     */
    List<SysRole> getByPage(Page<SysRole> page);

    /**
     * 查询总数
     * @param page
     * @return
     */
    Integer countByPage(Page<SysRole> page);

    /**
     * 根据id删除
     * @param id
     */
    void delete(Long id);

    /**
     * 更新
     * @param sysRole
     */
    void update(SysRole sysRole);

    List<SysRole> getByIds(List<Long> roleIds);

    List<SysRole> getAll();
}

